import Vue from 'vue';
import Router from 'vue-router';
import Login from '../views/Login.vue'
import Index from '../views/Index.vue'
import Config from '../views/Config.vue'
import Gm from '../views/Gm.vue'
import Mysql from '../views/Mysql.vue'
import Jslog from '../views/Jslog.vue'
import Jsmodule from '../views/Jsmodule.vue'

Vue.use(Router);

let routes = [];
routes.push({
    path: '/',
    component: Login,
});

let indexObj = {
    path: '/index',
    component: Index,
    children: [],
};
indexObj.children.push({
    path: '/config',
    component: Config,
});
indexObj.children.push({
    path: '/gm',
    component: Gm,
});
indexObj.children.push({
    path: '/mysql',
    component: Mysql,
});
indexObj.children.push({
    path: '/jslog',
    component: Jslog,
});
indexObj.children.push({
    path: '/jsmodule',
    component: Jsmodule,
});
routes.push(indexObj);

let router = new Router({
    routes: routes,
    mode: 'history'
});

export default router;